// 给所有的函数天假一个hcall方法

Function.prototype.zhcall = function (thisArg, ...args) {
  console.log("zh被调用了", this);
  var fn = this;
  thisArg = thisArg ? Object(thisArg) : window;
  thisArg.fn = fn;
  var result = thisArg.fn(...args);
  delete thisArg;
  return result;
};

function foo(args) {
  console.log("foo被调用了", this);
}
function sum(num1, num2) {
  console.log("sum被调用了", this, num1, num2);
}

foo.zhcall("foo");
sum.zhcall(undefined, 12, 23);
